<template>
  <!-- 1. 通过 v-on:event="handle" 或者@event="handleEvent" -->
  <view class="search"
        @click="goToSearch()">
    <view class="content">搜索</view>
  </view>
</template>

<script>
export default {
  name: 'search',
  data() {
    return {}
  },
  methods: {
    goToSearch() {
      uni.navigateTo({
        url: '/pages/search/search',
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.search {
  height: 100rpx;
  width: 750rpx;
  background-color: #fa3534;
  display: flex;
  align-items: center;
  justify-content: center;

  .content {
    width: 700rpx;
    height: 80rpx;
    border-radius: 5px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #767676;
  }
}
</style>
